<template>
  <div>
    <div class="recommend-title">周末去哪儿</div>
    <ul>
      <li class="list-item" v-for="item of weekendList" :key="item.id">
        <div class="item-img">
          <img :src="item.imgUrl" :alt="item.title" />
        </div>
        <div class="item-info">
          <div class="inner-box">
            <div class="info-title">{{ item.title }}</div>
            <div class="info-comment">{{ item.comment }}</div>
          </div>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "HomeWeekend",
  props: {
    weekendList: Array
  }
};
</script>

<style lang="stylus" scoped>
@import '~styles/variables.styl';
@import '~styles/mixins.styl';

div {
  box-sizing: border-box;
}

.recommend-title {
  width: 100%;
  height: 0.8rem;
  line-height: 0.8rem;
  font-size: 0.28rem;
  padding: 0 0.2rem;
}

.list-item .item-img {
  overflow: hidden;
  width: 100%;
  height: 0;
  padding-bottom: 37.1%;
}

.list-item .item-img img {
  width: 100%;
}

.list-item .item-info {
  float: left;
  width: 100%;
  height: 1.24rem;
  padding: 0.14rem 0.2rem 0.2rem 0.2rem;
}

.list-item .item-info .inner-box {
  width: 100%;
  height: 100%;
}

.list-item .item-info .inner-box .info-title {
  width: 100%;
  height: 0.48rem;
  line-height: 0.48rem;
  font-size: 0.28rem;
  ellipsis();
}

.list-item .item-info .inner-box .info-comment {
  width: 100%;
  height: 0.42rem;
  line-height: 0.42rem;
  font-size: 0.24rem;
  ellipsis();
}
</style>
